﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Sbook.Data
{
    public class Mysession
    {
        public static Data.UserInfo Session
        {
            get
            {
                if(HttpContext.Current.Session["User"]!=null)
                    return HttpContext.Current.Session["User"] as Data.UserInfo;
                return null;
            }
            set
            {
                HttpContext.Current.Session["User"] = value;
            }
        }
        public static bool isLogin
        {
            get
            {
                return HttpContext.Current.Session["User"] != null;
            }
        }
    }
}